* (bug 2785) Accept optional colon prefix in links when formatting comments
authorRob Church <robchurch@users.mediawiki.org>
Mon, 18 Dec 2006 17:23:25 +0000 (17:23 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Mon, 18 Dec 2006 17:23:25 +0000 (17:23 +0000)
RELEASE-NOTES
includes/Linker.php

index 6d1d114..f24d47c 100644 (file)
@@ -341,6 +341,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 8110) Make magic ISBN linking stricter: only match ten-digit sequences
   (plus optional ISBN-13 prefix) with no immediately following alphanumeric
   character, disallow multiple consecutive internal redirects
+* (bug 2785) Accept optional colon prefix in links when formatting comments
 
 == Languages updated ==
 
index b3a24e1..ad2f098 100644 (file)
@@ -912,7 +912,7 @@ class Linker {
                # is ignored
                $medians = '(?:' . preg_quote( Namespace::getCanonicalName( NS_MEDIA ), '/' ) . '|';
                $medians .= preg_quote( $wgContLang->getNsText( NS_MEDIA ), '/' ) . '):';
-               while(preg_match('/\[\[(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
+               while(preg_match('/\[\[:?(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
                        # Handle link renaming [[foo|text]] will show link as "text"
                        if( "" != $match[3] ) {
                                $text = $match[3];